/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ucm;

import javax.swing.JMenuItem;

/**
 * Use case control components class to handle the exit simulation menu item event.
 * @author Chiaki Sato
 * @since J2SDK 1.6
 * @version 1.0
 */
public class UCExitSimulationMenu extends JMenuItem implements UCController{

    /**
     * Constructor of exit simulation menu item class.
     * @param stText Control caption text
     */
    public UCExitSimulationMenu(String stText) {

        super(stText);
    }

    /**
     * Public run function to execute a process of the exit simulation menu item.
     */
    public void run() {

        // User clicks exit the simulation menu item
        // System terminates the traffic simulation program
        System.exit(0);
    }
}
